import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.function.Consumer;

public class _Alg {

    private static List<Integer> originInts = Arrays.asList(1, 3, 8, 2, 50, 73, 93, 18, 50, 86, 25, 67, 23, 763, 50, 4, 7, 50, 50);

    public static void main(String[] args) {

        List<Integer> ints = new ArrayList<>();
        ints.addAll(originInts);

        int count = ints.size();
        int delCount = 0;
        boolean shouldDel = false;
        for (int i = count - 1; i >= 0; i = i - 1 - delCount) {
            boolean del = ints.get(i) == 50;

            if (del)
                ints.remove(i);

        }

        System.out.println(ints);


        List list = new ArrayList();
        list.add("1");
        list.add(1);
        list.add(new User("Bob", 13));

        list.forEach(System.out::println);

    }

    static class User {

        public User(String name, int age) {
            this.name = name;
            this.age = age;
        }

        String name;
        int age;

        @Override
        public String toString() {
            return "User{" +
                    "name='" + name + '\'' +
                    ", age=" + age +
                    '}';
        }
    }
}
